import { defineStore } from "pinia";
import { ref } from "vue";
// 定义store
const useUserInfoStore = defineStore("userInfo", () => {

    // 定义状态的内容
    const info = ref({});

    // 修改info
    const setInfo = (newUserInfo) => {
        info.value = newUserInfo;
    };
    //
    const removeInfo = () => {
        info.value = {};
    }
    return {
        info,
        setInfo,
        removeInfo
    };
}, {
    persist: true
});
export default useUserInfoStore;